//
//  XMLInterface.h
//  Rainbow
//
//  Created by Guillaume Dupuis on 21/07/09.
//  Copyright 2009 Erasmus Software. All rights reserved.
//
#import <Cocoa/Cocoa.h>

#define kId			@"Id"
#define kTitle		@"Title"
#define kDirector	@"Director"
#define kYear		@"Year"
#define kLanguage	@"Language"
#define kType		@"Type"
#define kActor		@"Actor"
#define kSummary	@"Summary"
#define kTags	    @"Tags"
#define kComment	@"Comment"
#define kPath		@"Path"
#define kLoanable	@"Loanable"

@interface XMLInterface : NSObject {
    NSXMLDocument	*_xmlDoc;
	NSString		*_path;
}

// Get and save the XMl tree
-(id)			initPars;
-(void)			loadDvd:(NSMutableArray*)dvds;
-(void)			save;

// DVD action
-(void)			listNameOfDvd;
-(NSInteger)	getNewId;
-(void)			addDvd:(NSDictionary *)dvd;
-(void)			deleteDvd:(NSInteger)id;
-(void)			setDvdOwner:(NSString *)owner;

-(NSXMLElement*)searchID:(NSInteger)id;

@end
